Optimal. Leaf size=94 \[ \frac{2 \left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))^3}{3 d}-\frac{\left (a^2+b^2\right )^2 (b \cos (c+d x)-a \sin (c+d x))}{d}-\frac{(b \cos (c+d x)-a \sin (c+d x))^5}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0468233, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3072, 194} \[ \frac{2 \left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))^3}{3 d}-\frac{\left (a^2+b^2\right )^2 (b \cos (c+d x)-a \sin (c+d x))}{d}-\frac{(b \cos (c+d x)-a \sin (c+d x))^5}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3072
Rule 194
Rubi steps
\begin{align*} \int (a \cos (c+d x)+b \sin (c+d x))^5 \, dx &=-\frac{\operatorname{Subst}\left (\int \left (a^2+b^2-x^2\right )^2 \, dx,x,b \cos (c+d x)-a \sin (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a^4 \left (1+\frac{2 a^2 b^2+b^4}{a^4}\right )-2 a^2 \left (1+\frac{b^2}{a^2}\right ) x^2+x^4\right ) \, dx,x,b \cos (c+d x)-a \sin (c+d x)\right )}{d}\\ &=-\frac{\left (a^2+b^2\right )^2 (b \cos (c+d x)-a \sin (c+d x))}{d}+\frac{2 \left (a^2+b^2\right ) (b \cos (c+d x)-a \sin (c+d x))^3}{3 d}-\frac{(b \cos (c+d x)-a \sin (c+d x))^5}{5 d}\\ \end{align*}
Mathematica [A] time = 0.463477, size = 156, normalized size = 1.66 \[ \frac{150 a \left (a^2+b^2\right )^2 \sin (c+d x)+25 a \left (-2 a^2 b^2+a^4-3 b^4\right ) \sin (3 (c+d x))+3 a \left (-10 a^2 b^2+a^4+5 b^4\right ) \sin (5 (c+d x))-150 b \left (a^2+b^2\right )^2 \cos (c+d x)+25 b \left (-2 a^2 b^2-3 a^4+b^4\right ) \cos (3 (c+d x))-3 b \left (-10 a^2 b^2+5 a^4+b^4\right ) \cos (5 (c+d x))}{240 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.154, size = 175, normalized size = 1.9 \begin{align*}{\frac{1}{d} \left ( -{\frac{{b}^{5}\cos \left ( dx+c \right ) }{5} \left ({\frac{8}{3}}+ \left ( \sin \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) }+a{b}^{4} \left ( \sin \left ( dx+c \right ) \right ) ^{5}+10\,{a}^{2}{b}^{3} \left ( -1/5\, \left ( \sin \left ( dx+c \right ) \right ) ^{2} \left ( \cos \left ( dx+c \right ) \right ) ^{3}-2/15\, \left ( \cos \left ( dx+c \right ) \right ) ^{3} \right ) +10\,{a}^{3}{b}^{2} \left ( -1/5\,\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{4}+1/15\, \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) \right ) -{a}^{4}b \left ( \cos \left ( dx+c \right ) \right ) ^{5}+{\frac{{a}^{5}\sin \left ( dx+c \right ) }{5} \left ({\frac{8}{3}}+ \left ( \cos \left ( dx+c \right ) \right ) ^{4}+{\frac{4\, \left ( \cos \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.23263, size = 232, normalized size = 2.47 \begin{align*} -\frac{a^{4} b \cos \left (d x + c\right )^{5}}{d} + \frac{a b^{4} \sin \left (d x + c\right )^{5}}{d} + \frac{{\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} a^{5}}{15 \, d} - \frac{2 \,{\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} a^{3} b^{2}}{3 \, d} + \frac{2 \,{\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a^{2} b^{3}}{3 \, d} - \frac{{\left (3 \, \cos \left (d x + c\right )^{5} - 10 \, \cos \left (d x + c\right )^{3} + 15 \, \cos \left (d x + c\right )\right )} b^{5}}{15 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.513386, size = 354, normalized size = 3.77 \begin{align*} -\frac{15 \, b^{5} \cos \left (d x + c\right ) + 3 \,{\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{5} + 10 \,{\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{3} -{\left (8 \, a^{5} + 20 \, a^{3} b^{2} + 15 \, a b^{4} + 3 \,{\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} + 2 \,{\left (2 \, a^{5} + 5 \, a^{3} b^{2} - 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{15 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.98121, size = 267, normalized size = 2.84 \begin{align*} \begin{cases} \frac{8 a^{5} \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac{4 a^{5} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} + \frac{a^{5} \sin{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} - \frac{a^{4} b \cos ^{5}{\left (c + d x \right )}}{d} + \frac{4 a^{3} b^{2} \sin ^{5}{\left (c + d x \right )}}{3 d} + \frac{10 a^{3} b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} - \frac{10 a^{2} b^{3} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac{4 a^{2} b^{3} \cos ^{5}{\left (c + d x \right )}}{3 d} + \frac{a b^{4} \sin ^{5}{\left (c + d x \right )}}{d} - \frac{b^{5} \sin ^{4}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{d} - \frac{4 b^{5} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac{8 b^{5} \cos ^{5}{\left (c + d x \right )}}{15 d} & \text{for}\: d \neq 0 \\x \left (a \cos{\left (c \right )} + b \sin{\left (c \right )}\right )^{5} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.1573, size = 252, normalized size = 2.68 \begin{align*} -\frac{{\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac{5 \,{\left (3 \, a^{4} b + 2 \, a^{2} b^{3} - b^{5}\right )} \cos \left (3 \, d x + 3 \, c\right )}{48 \, d} - \frac{5 \,{\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )}{8 \, d} + \frac{{\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \sin \left (5 \, d x + 5 \, c\right )}{80 \, d} + \frac{5 \,{\left (a^{5} - 2 \, a^{3} b^{2} - 3 \, a b^{4}\right )} \sin \left (3 \, d x + 3 \, c\right )}{48 \, d} + \frac{5 \,{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \sin \left (d x + c\right )}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]